<template>
	<view class="home">
		<u-navbar @leftClick="leftClick" @rightClick="rightClick" placeholder :safeAreaInsetTop="true" title="流速仪列表" :fixed="true" rightIcon="plus">
		</u-navbar>
				<view class="conttit">
					选择流速仪
				</view>
				<view class="topitem" @click="urlCezhan(item)" v-for="(item, index) in cezhanlist" :key="index">
					<view class="topname">
						{{item.name}}
					</view>
					<view class="topdik">
						<view class="xishu">
							a系数：
						</view>
						<view class="nubbb">
							{{item.aa}}
						</view>
					</view>
					<view class="topdik">
						<view class="xishu">
							b系数：
						</view>
						<view class="nubbb">
							{{item.bb}}
						</view>
					</view>
					<view class="topdik">
						<view class="xishu">
							c系数：
						</view>
						<view class="nubbb">
							{{item.cc}}
						</view>
					</view>
				</view>
<!-- 			</uni-swipe-action-item>
		</uni-swipe-action> -->
		<!-- 切换 -->
	</view>
</template>

<script>
	import {
		cezhan
	} from '@/common/cezhanlist.js';
	// import cezlist '@/common/cezhanlist.js'
	export default {
		data() {
			return {
				cezhanlist: [],
				ty:''
			}
		},
		onShow() {
			this.cezhanlist = this.vuex_liusuyiList
			console.log('js', this.cezhanlist);
		},
		onLoad(option) {
			console.log('option',option);
			this.ty = option.ty
		},
		methods: {
			urlCezhan(item){
				console.log('item',item);
				uni.redirectTo({
					url: '/pagesA/aproductA/measureLiusuyiShow?&id=' + item.id + "&ty=" + this.ty
				});
			},
			// 返回
			leftClick(){
				uni.navigateBack({
					delta: 1
				});
			},
			// 添加
			rightClick(){
				this.inCezhan()
			},
			inCezhan() {
				let ran01 = new Date().getTime()
				uni.navigateTo({
					url: '/pagesA/aproductA/liusuyiList?&id=' + ran01
				});
			}
		}
	}
</script>
<style scoped lang="scss">
	.topitem {
		width: 650rpx;
		margin: 30rpx auto;
		padding: 0 20rpx 20rpx 20rpx;
		border-radius: 30rpx;
		border: #ffffff solid 3rpx;
		box-shadow: 5rpx 5rpx 20rpx 5rpx #cad0d9;
		background-color: #f7fbfd;
		// background-color: #f4f6f8;

		.topname {
			font-size: 50rpx;
			padding: 15rpx;
			color: #ffaa00;
			text-align: center;
			margin-bottom: 20rpx;
			border-bottom: #c6d5da solid 2rpx;
			// background-color: #ff8826;
		}

		.topdik {
			font-size: 40rpx;
			padding: 0 15rpx;
			line-height: 70rpx;
			color: #575f62;
			display: flex;
			align-items: center;

			// background-color: #ff8826;
			.xishu {
				width: 260rpx;
				display: inline-block;
				text-align-last: justify;
			}
			.nubbb {
				color: #903749;
			}
		}
	}

	.u-page {
		padding: 0;
	}

	.u-demo-block__title {
		padding: 10px 0 2px 15px;
	}

	.swipe-action {
		&__content {
			padding: 25rpx 0;

			&__text {
				font-size: 15px;
				color: $u-main-color;
				padding-left: 30rpx;
			}
		}
	}
	.conttit {
		width: 600rpx;
		margin: 0 auto;
		margin-top: 30rpx;
		text-align: center;
		color: #ffffff;
		padding: 20rpx 40rpx;
		font-size: 45rpx;
		border-radius: 30rpx;
		border: #ffffff solid 3rpx;
		box-shadow: 5rpx 5rpx 20rpx 5rpx #cad0d9;
		background-color: #ffaa00;
		letter-spacing:30rpx;
	}
</style>
<style>
	page {
		/* background-color: #f8f8f8; */
	}
</style>